﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;

namespace livingwellclinic
{
    public partial class Volunteer : System.Web.UI.Page
    {
        SortedList volunteerinfo = new SortedList();
        string temp; 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DropDownList1.SelectedIndex = 0;
            }
        }

        protected void CancelButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("/Default.aspx");
        }

        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            if (DropDownList1.SelectedIndex == 0)
                ddlposition.IsValid = false;
            else
                ddlposition.IsValid = true;
                 temp = Convert.ToString(DropDownList1.SelectedValue);
                volunteerinfo.Add("temp", temp);
                Session.Add("VolunteerSession", volunteerinfo);
                MultiView1.ActiveViewIndex = 1;
                volunteerlbl.Text = (string)volunteerinfo.GetByIndex(0);
                
        }

        protected void Button_Click(object sender, EventArgs e)
        {
            Response.Redirect("/Default.aspx");
        }
    }
}